package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SLotteryCustruleDao;
import com.xyz.domain.table.SLotteryCustrule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SLotteryCustruleLogic {

    @Autowired
    private SLotteryCustruleDao sLotteryCustruleDao;

    public SLotteryCustrule add(SLotteryCustrule sLotteryCustrule){
        return sLotteryCustruleDao.insert(sLotteryCustrule);
    }

    public Integer update(SLotteryCustrule sLotteryCustrule){
        return sLotteryCustruleDao.update(sLotteryCustrule);
    }

    public List<SLotteryCustrule> list(SLotteryCustrule sLotteryCustrule, String orderBy){
        return sLotteryCustruleDao.selectList(sLotteryCustrule, orderBy);
    }

    public Integer delete(Integer key){
        return sLotteryCustruleDao.delete(key);
    }

    public PageResponseModel<SLotteryCustrule> pageInfo(SLotteryCustrule sLotteryCustrule, String orderBy, Integer pageNo, Integer pageSize){
        return sLotteryCustruleDao.selectByPageNo(sLotteryCustrule, orderBy, pageNo, pageSize);
    }

}